home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992…ugust: Hack to the Future / ADC Developer CD (1992-08) (''Hack To The Future'')_iso / Dev.CD 199208.iso / Periodicals / develop / develop 7 code / QuickTime / SimpleInMovies / SimpleInMovies.r < prev    next >
Encoding:
Text File  |  1992-01-13  |  11.6 KB  |  643 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2.  
  3.       Sample.r    -  Resources for SimpleInMovies
  4.  
  5.       Copyright Apple Computer, Inc. 1985-1991
  6.       All rights reserved.
  7.  
  8. ------------------------------------------------------------------------------*/
  9. /* Here we use new system 7 features in the creation of windows */
  10. #ifndef SystemSevenOrLater
  11. #define SystemSevenOrLater 1
  12. #endif
  13. #include "Types.r"
  14. #include "SysTypes.r"
  15.  
  16. /* These define's are used in the MENU resources to disable specific
  17.    menu items. */
  18. #define AllItems    0b1111111111111111111111111111111    /* 31 flags */
  19. #define MenuItem1    0b00001
  20. #define MenuItem2    0b00010
  21. #define MenuItem3    0b00100
  22. #define MenuItem4    0b01000
  23. #define MenuItem5    0b10000
  24. #define MenuItem6    0b100000
  25. #define MenuItem7    0b1000000
  26. #define MenuItem8    0b10000000
  27. #define MenuItem9    0b100000000
  28.  
  29. type 'desa' as 'STR ';
  30. #define    rUserAlert            129        /* error user alert */
  31. #define    rLandscapeAlert        130        /* landscape orientation set user alert */
  32. #define    r32BitQDAlert       131     /* 32-bit QD required alert */
  33. #define    rNOPrGeneralAlert   132     /* the NOPrGeneral alert */
  34.  
  35.  
  36. resource 'SIZE' (-1, purgeable) {
  37.     saveScreen,
  38.     acceptSuspendResumeEvents,
  39.     disableOptionSwitch,
  40.     canBackground,
  41.     multiFinderAware,
  42.     backgroundAndForeground,
  43.     dontGetFrontClicks,
  44.     ignoreChildDiedEvents,
  45.     not32BitCompatible,
  46.     isHighLevelEventAware,
  47.     localAndRemoteHLEvents,
  48.     notStationeryAware,
  49.     dontUseTextEditServices,
  50.     reserved,
  51.     reserved,
  52.     reserved,
  53.     1048576,
  54.     1048576
  55. };
  56.  
  57. resource 'vers' (1) {
  58.     0x01, 0x00, release, 0x00,
  59.     verUs,
  60.     "0.00",
  61.     "0.00, Copyright © 1991 Apple Computer, Inc."
  62. };
  63.  
  64. resource 'desa' (0, purgeable) {
  65.     "Sample Moovie Playing App by Macintosh Developer Technical Support"
  66. };
  67.  
  68. resource 'BNDL' (128, purgeable) {
  69.     'desa',
  70.     0,
  71.     {
  72.     'ICN#', {0, 128},
  73.     'FREF', {0, 128}
  74.     }
  75. };
  76.  
  77. resource 'FREF' (128, purgeable) {
  78.     'APPL',
  79.     0,
  80.     ""
  81. };
  82.  
  83.  
  84.  
  85. resource 'ICN#' (128, purgeable) {
  86.     {    /* array: 2 elements */
  87.         /* [1] */
  88.         $"0000 0000 07FF FFE0 0800 0010 09FF FF90"
  89.         $"0A00 0050 0A00 0050 0AF3 E750 0A88 8850"
  90.         $"0A88 8850 0A88 8650 0A88 8150 0A88 8150"
  91.         $"0AF0 8E50 0A00 0050 0A00 0050 0A00 0050"
  92.         $"09FF FF90 0800 0010 0FFF FFF0 0800 0010"
  93.         $"0800 0010 0800 0010 0800 7F10 0800 0010"
  94.         $"0800 0010 0800 0010 0800 0010 07FF FFE0"
  95.         $"0400 0020 0400 0020 0400 0020 07FF FFE0",
  96.         /* [2] */
  97.         $"0000 0000 07FF FFE0 0FFF FFF0 0FFF FFF0"
  98.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  99.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  100.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  101.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  102.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  103.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 07FF FFE0"
  104.         $"07FF FFE0 07FF FFE0 07FF FFE0 07FF FFE0"
  105.     }
  106. };
  107.  
  108. /* Here we use new system 7 features in the creation of windows */
  109. resource 'WIND' (128, "Sample Window") {
  110.     {40, 0, 240, 200},
  111.     noGrowDocProc,
  112.     invisible,
  113.     goAway,
  114.     0x0,
  115.     "Sample Window",
  116.     staggerParentWindowScreen,
  117. };
  118.  
  119. resource 'DLOG' (128, "About Sample…") {
  120.     {66, 102, 224, 400},
  121.     dBoxProc, visible, noGoAway, 0x0, 128, "",centerParentWindowScreen
  122. };
  123.  
  124. resource 'DITL' (128) {
  125.      {
  126. /* 1 */ {130, 205, 150, 284},
  127.         button {
  128.             enabled,
  129.             "Continue"
  130.         };
  131. /* 2 */ {104, 144, 120, 296},                /* SourceLanguage Item */
  132.         staticText {
  133.             disabled,
  134.             ""
  135.         };
  136. /* 3 */ {88, 144, 105, 218},                /* Author Item */
  137.         staticText {
  138.             disabled,
  139.             ""
  140.         };
  141. /* 4 */ {8, 32, 26, 273},
  142.         staticText {
  143.             disabled,
  144.             "Macintosh Programmer's Workshop"
  145.         };
  146. /* 5 */ {32, 50, 50, 392},
  147.         staticText {
  148.             disabled,
  149.             "Sample Movie Loading Application"
  150.         };
  151. /* 6 */ {56, 16, 74, 281},
  152.         staticText {
  153.             enabled, "Copyright © 1985-1991 Apple Computer"
  154.         };
  155. /* 7 */ {88, 16, 104, 144},
  156.         staticText {
  157.             enabled, "Source Language:"
  158.         };
  159. /* 8 */ {104, 16, 120, 144},
  160.         staticText {
  161.             enabled, "by:"
  162.         }
  163.     }
  164. };
  165.  
  166. resource 'DLOG' (130) {
  167.     {40, 40, 240, 280},
  168.     altDBoxProc,
  169.     visible,
  170.     goAway,
  171.     0x0,
  172.     131,
  173.     "",
  174.     centerParentWindowScreen
  175. };
  176.  
  177. resource 'DITL' (131) {
  178.     {    /* array DITLarray: 3 elements */
  179.         /* [1] */
  180.         {170, 138, 190, 196},
  181.         Button {
  182.             enabled,
  183.             "OK"
  184.         },
  185.         /* [2] */
  186.         {170, 33, 190, 91},
  187.         Button {
  188.             enabled,
  189.             "No Way!"
  190.         },
  191.         /* [3] */
  192.         {14, 46, 154, 186},
  193.         UserItem {
  194.             enabled
  195.         },
  196.         /* [4] */ {0, 4, 15, 392},
  197.         staticText {
  198.             disabled,
  199.             "Set this frame as movie poster?"
  200.         }
  201.     }
  202. };
  203.  
  204. resource 'DLOG' (250, purgeable) {
  205.     {40, 20, 144, 400},
  206.     dBoxProc,
  207.     visible,
  208.     noGoAway,
  209.     0x0,
  210.     250,
  211.     "",
  212.     noAutoCenter
  213. };
  214. resource 'DITL' (250, purgeable) {
  215.     {
  216.         {71, 315, 91, 367},        Button { enabled, "Save" },
  217.         {0, -1000, 20, 2},        StaticText { disabled, "=S190001,=s190001,=D190003,=d190003,=.190104,1B190004" },
  218.         {71, 80, 91, 162},        Button { enabled, "Don’t Save" },
  219.         {71, 244, 91, 302},        Button { enabled, "Cancel" },
  220.         {11, 78, 61, 366},        StaticText { disabled, "Save changes to the movie “^0” before ^1?" },
  221.         {11, 23, 43, 55},        Icon { disabled, 2 },
  222.     }
  223. };
  224.  
  225.  
  226. resource 'DLOG' (300, purgeable) {
  227.     {0, 0, 216, 350},
  228.     dBoxProc,
  229.     invisible,
  230.     noGoAway,
  231.     0x0,
  232.     300,
  233.     "",
  234.     noAutoCenter
  235. };
  236.  
  237. resource 'DITL' (300, purgeable) {
  238.     {    /* array DITLarray: 13 elements */
  239.         /* [1] */
  240.         {161, 252, 181, 332},
  241.         Button {
  242.             enabled,
  243.             "Save"
  244.         },
  245.         /* [2] */
  246.         {130, 252, 150, 332},
  247.         Button {
  248.             enabled,
  249.             "Cancel"
  250.         },
  251.         /* [3] */
  252.         {0, 0, 0, 0},
  253.         HelpItem {
  254.             disabled,
  255.             HMScanhdlg {
  256.                 -6043
  257.             }
  258.         },
  259.         /* [4] */
  260.         {8, 235, 24, 337},
  261.         UserItem {
  262.             enabled
  263.         },
  264.         /* [5] */
  265.         {32, 252, 52, 332},
  266.         Button {
  267.             enabled,
  268.             "Eject"
  269.         },
  270.         /* [6] */
  271.         {60, 252, 80, 332},
  272.         Button {
  273.             enabled,
  274.             "Desktop"
  275.         },
  276.         /* [7] */
  277.         {29, 12, 127, 230},
  278.         UserItem {
  279.             enabled
  280.         },
  281.         /* [8] */
  282.         {6, 12, 25, 230},
  283.         UserItem {
  284.             enabled
  285.         },
  286.         /* [9] */
  287.         {119, 250, 120, 334},
  288.         Picture {
  289.             disabled,
  290.             11
  291.         },
  292.         /* [10] */
  293.         {157, 15, 173, 227},
  294.         EditText {
  295.             enabled,
  296.             ""
  297.         },
  298.         /* [11] */
  299.         {136, 15, 152, 227},
  300.         StaticText {
  301.             disabled,
  302.             "Save as:"
  303.         },
  304.         /* [12] */
  305.         {88, 252, 108, 332},
  306.         UserItem {
  307.             disabled
  308.         },
  309.         /* [13] */
  310.         {188, 13, 206, 128},
  311.         CheckBox {
  312.             enabled,
  313.             "Flatten Movie"
  314.         }
  315.     }
  316. };
  317.  
  318. data 'DLOG' (450) {
  319.     $"0028 0028 00F0 0118 0001 0100 0100 0000"            /* .(.(............ */
  320.     $"0000 01C2 00"                                       /* ...Ä. */
  321. };
  322.  
  323. resource 'DITL' (450) {
  324.     {    /* array DITLarray: 4 elements */
  325.         /* [1] */
  326.         {28, 44, 43, 192},
  327.         StaticText {
  328.             disabled,
  329.             "Flattening in progress"
  330.         },
  331.         /* [2] */
  332.         {73, 80, 92, 116},
  333.         StaticText {
  334.             enabled,
  335.             "^0"
  336.         },
  337.         /* [3] */
  338.         {130, 89, 150, 147},
  339.         Button {
  340.             enabled,
  341.             "Cancel"
  342.         },
  343.         /* [4] */
  344.         {74, 124, 90, 199},
  345.         StaticText {
  346.             disabled,
  347.             "% Done"
  348.         }
  349.     }
  350. };
  351.  
  352. resource 'MENU' (128, "Apple", preload) {
  353.     128, textMenuProc,
  354.     AllItems & ~MenuItem2,    /* Disable item #2 */
  355.     enabled, apple,
  356.     {
  357.         "About Sample…",
  358.             noicon, nokey, nomark, plain;
  359.         "-",
  360.             noicon, nokey, nomark, plain
  361.     }
  362. };
  363.  
  364. resource 'MENU' (129, "File", preload) {
  365.     129, textMenuProc,
  366.     AllItems & ~MenuItem3 & ~MenuItem4,
  367.     enabled, "File",
  368.     {
  369.         "New Movie",
  370.             noicon, "N", nomark, plain;
  371.         "Open Movie",
  372.             noicon, "O", nomark, plain;
  373.         "Close",
  374.             noicon, "W", nomark,plain;
  375.         "-",
  376.             noicon, nokey, nomark, plain;
  377.         "Save",
  378.             noicon, "S", nomark,plain;
  379.         "Save As …",
  380.             noicon, nokey, nomark,plain;
  381.         "-",
  382.             noicon, nokey, nomark, plain;
  383.         "Print",
  384.             noicon, "P", nomark, plain;
  385.         "Page Setup...",
  386.             noicon, nokey, nomark, plain;
  387.         "-",
  388.             noicon, nokey, nomark, plain;
  389.         "Quit",
  390.             noicon, "Q", nomark, plain
  391.     }
  392. };
  393.  
  394. resource 'MENU' (130, "Edit", preload) {
  395.     130, textMenuProc,
  396.     AllItems & ~( MenuItem2),    /* Disable item #2 */
  397.     enabled, "Edit",
  398.      {
  399.         "Undo",
  400.             noicon, "Z", nomark, plain;
  401.         "-",
  402.             noicon, nokey, nomark, plain;
  403.         "Cut",
  404.             noicon, "X", nomark, plain;
  405.         "Copy",
  406.             noicon, "C", nomark, plain;
  407.         "Paste",
  408.             noicon, "V", nomark, plain;
  409.         "Clear",
  410.             noicon, nokey, nomark, plain;
  411.         "Select All",
  412.             noicon, "A", nomark, plain
  413.     }
  414. };
  415.  
  416. resource 'MENU' (131, "Stuff", preload) {
  417.     131, textMenuProc,
  418.     allEnabled,
  419.     enabled, "Movie Stuff",
  420.     {
  421.         "Stop Movie",
  422.             noicon, "P", nomark, plain;
  423.         "Sound Off",
  424.             noicon, nokey, nomark, plain;
  425.         "Next Frame",
  426.             noicon, "F", nomark, plain;
  427.         "Prev Frame",
  428.             noicon, "B", nomark, plain;
  429.         "Loop the Loop",
  430.             noicon, nokey, nomark, plain;
  431.         "Palindrome",
  432.             noicon, nokey, nomark, plain;
  433.         "Enable Edits",
  434.             noicon, "E", nomark,plain;
  435.     }
  436. };
  437.  
  438. resource 'MENU' (132, "More Stuff", preload) {
  439.     132, textMenuProc,
  440.     allEnabled,
  441.     enabled, "and ...",
  442.     {
  443.         "GetTrackPicts",
  444.             noicon, nokey, nomark, plain;
  445.         "Set Movie Poster",
  446.             noicon, nokey, nomark, plain;
  447.     }
  448. };
  449.  
  450.  
  451. resource 'DITL' (429, purgeable) {
  452.     {    /* array DITLarray: 2 elements */
  453.         /* [1] */
  454.         {78, 173, 98, 243},
  455.         Button {
  456.             enabled,
  457.             "Away!"
  458.         },
  459.         /* [2] */
  460.         {31, 74, 68, 257},
  461.         StaticText {
  462.             disabled,
  463.             "The Movie Toolbox or the Controller"
  464.             "Component failed to initialize."
  465.         }
  466.     }
  467. };
  468.  
  469. resource 'ALRT' (429, purgeable) {
  470.     {50, 30, 165, 290},
  471.     429,
  472.     {    /* array: 4 elements */
  473.         /* [1] */
  474.         OK, visible, sound3,
  475.         /* [2] */
  476.         OK, visible, sound1,
  477.         /* [3] */
  478.         OK, visible, sound2,
  479.         /* [4] */
  480.         OK, visible, sound3,
  481.     },
  482.         centerParentWindowScreen,
  483. };
  484.  
  485. resource 'STR#' (366, purgeable) {
  486.     {
  487.         "Save File As:",
  488.         "Untitled #",
  489.         "closing",
  490.         "quitting"
  491.     }
  492. };
  493.  
  494. resource 'DITL' (430, purgeable) {
  495.     {    /* array DITLarray: 2 elements */
  496.         /* [1] */
  497.         {78, 173, 98, 343},
  498.         Button {
  499.             enabled,
  500.             "Hasta la vista, Baby!"
  501.         },
  502.         /* [2] */
  503.         {31, 74, 68, 257},
  504.         StaticText {
  505.             disabled,
  506.             "I know Miss Manners wouldn't approve it"
  507.             "but we only run under system 7."
  508.         }
  509.     }
  510. };
  511.  
  512. resource 'ALRT' (430, purgeable) {
  513.     {50, 30, 165, 290},
  514.     430,
  515.     {    /* array: 4 elements */
  516.         /* [1] */
  517.         OK, visible, sound3,
  518.         /* [2] */
  519.         OK, visible, sound1,
  520.         /* [3] */
  521.         OK, visible, sound2,
  522.         /* [4] */
  523.         OK, visible, sound3,
  524.     },
  525.         centerParentWindowScreen,
  526. };
  527.  
  528.  
  529. /* this ALRT and DITL are used as an error screen */
  530.  
  531. resource 'ALRT' (rUserAlert, purgeable) {
  532.     {40, 20, 126, 326},
  533.     rUserAlert,
  534.     { /* array: 4 elements */
  535.         /* [1] */
  536.         OK, visible, silent,
  537.         /* [2] */
  538.         OK, visible, silent,
  539.         /* [3] */
  540.         OK, visible, silent,
  541.         /* [4] */
  542.         OK, visible, silent
  543.     },
  544.         centerParentWindowScreen,
  545. };
  546.  
  547.  
  548. resource 'DITL' (rUserAlert, purgeable) {
  549.     { /* array DITLarray: 3 elements */
  550.         /* [1] */
  551.         {51, 209, 70, 290},
  552.         Button {
  553.             enabled,
  554.             "OK"
  555.         },
  556.         /* [2] */
  557.         {10, 60, 30, 300},
  558.         StaticText {
  559.             disabled,
  560.             "Error occurred"
  561.         },
  562.         /* [3] */
  563.         {8, 8, 40, 40},
  564.         Icon {
  565.             disabled,
  566.             2
  567.         }
  568.     }
  569. };
  570.  
  571.  
  572. /* this ALRT and DITL are used to tell the user that PrGeneral is not available,   */
  573. /* but, you will still be able to print with the current printer...                */
  574.  
  575. resource 'ALRT' (rNOPrGeneralAlert, purgeable) {
  576.     {40, 20, 155, 470},
  577.     rNOPrGeneralAlert,
  578.     { /* array: 4 elements */
  579.         /* [1] */
  580.         OK, visible, silent,
  581.         /* [2] */
  582.         OK, visible, silent,
  583.         /* [3] */
  584.         OK, visible, silent,
  585.         /* [4] */
  586.         OK, visible, silent
  587.     },
  588.         centerParentWindowScreen,
  589. };
  590.  
  591. resource 'DITL' (rNOPrGeneralAlert, purgeable) {
  592.     { /* array DITLarray: 3 elements */
  593.         /* [1] */
  594.         {80, 350, 100, 430},
  595.         Button {
  596.             enabled,
  597.             "OK"
  598.         },
  599.         /* [2] */
  600.         {10, 60, 65, 445},
  601.         StaticText {
  602.             disabled,
  603.             "PrGeneral is NOT available for the current printer.  You will not be able to use the features of PrGeneral, but PrGeneral Play will still print..."
  604.         },
  605.     }
  606. };
  607.  
  608. resource 'ALRT' (131, purgeable) {
  609.     {50, 30, 252, 410},
  610.     500,
  611.     {    /* array: 4 elements */
  612.         /* [1] */
  613.         OK, visible, sound3,
  614.         /* [2] */
  615.         OK, visible, sound1,
  616.         /* [3] */
  617.         OK, visible, sound2,
  618.         /* [4] */
  619.         OK, visible, sound3
  620.     },
  621.     centerParentWindowScreen
  622. };
  623.  
  624. resource 'DITL' (500) {
  625.     {    /* array DITLarray: 2 elements */
  626.         /* [1] */
  627.         {158, 156, 178, 214},
  628.         Button {
  629.             enabled,
  630.             "OK"
  631.         },
  632.         /* [2] */
  633.         {65, 55, 133, 325},
  634.         StaticText {
  635.             disabled,
  636.             "The poster picture for the movie  “^0” c"
  637.             "ould not be created. You may set the pos"
  638.             "ter in the “And ...” menu and try again."
  639.         }
  640.     }
  641. };
  642.  
  643.